﻿<window:MetroDPIWindow x:Class="CircuitDiagram.winNewComponentImplementation"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:window="clr-namespace:CircuitDiagram.DPIWindow;assembly=CircuitDiagram.DPIWindow"
        xmlns:my="clr-namespace:CircuitDiagram"
        Title="New" Height="204" Width="400" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
        TitleCaps="False" WindowTransitionsEnabled="False" EnableDWMDropShadow="True">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Colors.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Styles.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
            <my:MultiResolutionImageToImageSourceConverter x:Key="MultiResolutionImageToImageSourceConverter" />
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Label Content="Set" Height="28" HorizontalAlignment="Left" Margin="12,12,0,0" Name="lblSet" VerticalAlignment="Top" />
        <Label Content="Item" Height="28" HorizontalAlignment="Left" Margin="12,46,0,0" Name="lblItem" VerticalAlignment="Top" />
        <TextBox Height="23" Margin="120,14,12,0" Name="tbxImplementSet" VerticalAlignment="Top" IsReadOnly="True" />
        <TextBox Height="23" Margin="120,48,12,0" Name="tbxImplementItem" VerticalAlignment="Top" TextChanged="tbxImplementItem_TextChanged" />
        <Label Content="Representation" Height="28" HorizontalAlignment="Left" Margin="12,86,0,0" Name="lblRepresentation" VerticalAlignment="Top" />
        <ComboBox Height="48" Margin="120,77,12,0" Name="cbxRepresentation" VerticalAlignment="Top" SelectedIndex="0">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Rectangle Fill="White" Width="32" Height="32">
                            <Rectangle.OpacityMask>
                                <ImageBrush ImageSource="{Binding ToIcon, Converter={StaticResource MultiResolutionImageToImageSourceConverter}}" Stretch="None" />
                            </Rectangle.OpacityMask>
                        </Rectangle>
                        <TextBlock Text="{Binding ToName}" Margin="5,0,0,0" VerticalAlignment="Center" Visibility="{Binding Converter={StaticResource BoolToVisConverter}, Path=NoConfiguration}" />
                        <TextBlock Text="{Binding ToConfiguration}" Margin="5,0,0,0" VerticalAlignment="Center" Visibility="{Binding Converter={StaticResource BoolToVisConverter}, Path=HasConfiguration}" />
                    </StackPanel>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <Button Content="Cancel" Height="23" HorizontalAlignment="Right" Margin="0,0,12,12" Name="btnCancel" VerticalAlignment="Bottom" Width="75" Click="btnCancel_Click" />
        <Button Content="OK" Height="23" HorizontalAlignment="Right" Margin="0,0,93,12" Name="btnOK" VerticalAlignment="Bottom" Width="75" Click="btnOK_Click" />
    </Grid>
</window:MetroDPIWindow>
